<?php
//创建server对象，监听 9001端口 类型为SWOOLE_SOCK_UDP
$http = new swoole_http_server("120.78.56.63", 1001);

$http->on('request', function($request, $response){
    var_dump($request->get, $request->post);
    $response->header("Content-Type", 'text/html; charset=utf-8');
    $response->end("<h1>Hello Swoole!" . rand(100, 999) . "</h1>");
});

$http->start();